<?php

class M17CheckFrontendTemplate extends Frontend {
    private function tplObj($objRow) {
        $strClass = $this->findContentElement($objRow->type);
        return new $strClass($objRow);
    }
    
    public function doIt(Database_Result $objRow, $strBuffer)
    {
        if($objRow->template != '') {
            $objElement = $this->tplObj($objRow);
            $objElement->Template = new FrontendTemplate($objRow->template);
            $strBuffer = $objElement->Template->parse();
        }
        return $strBuffer;
    }
}